﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using TyMES.Model;

namespace TyMES.Model.BaseInformation
{
    /// <summary>
    /// 托盘管理
    /// </summary>
	[Table("T_Trays")]
    [SoftKey(nameof(Tray.TrayCode))]
    [Display(Name = "_Model.Tray")]
    public class Tray : TopBasePoco
    {
        [Display(Name = "_Model._Tray._TrayCode")]
        [Comment("托盘编码")]
        [Required(ErrorMessage = "Validate.{0}required")]
        [CanNotEdit]
        public string TrayCode { get; set; }
        [Display(Name = "_Model._Tray._TrayName")]
        [Comment("托盘名称")]
        public string TrayName { get; set; }
        [Display(Name = "_Model._Tray._TrayDescription")]
        [Comment("描述")]
        public string TrayDescription { get; set; }
        [Display(Name = "_Model._Tray._TrayStatus")]
        [Comment("状态")]
        public string TrayStatus { get; set; }
        [Display(Name = "_Model._Tray._Note")]
        [Comment("备注")]
        public string Note { get; set; }
        [Display(Name = "_Model._Tray._TrayLine")]
        [Comment("当前产线")]
        public string TrayLine { get; set; }
        [Display(Name = "_Model._Tray._TrayStation")]
        [Comment("当前工位")]
        public string TrayStation { get; set; }
        [Display(Name = "_Model._Tray._UsedTimes")]
        [Comment("使用寿命")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public int? UsedTimes { get; set; }
        [Display(Name = "_Model._Tray._PlannedTimes")]
        [Comment("预计寿命")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public int? PlannedTimes { get; set; }

	}

}
